<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Work extends CI_Controller
{
	function __construct()
	{
		parent::__construct();

		$this->load->helper('url');
		$this->load->library('tank_auth');
		$this->load->model('project');
	}
	
	function index()
	{
	    $this->view($data=null);
	}

	function view($data)
	{
        $data['page_id'] = "work";
        $data['project'] = $this->project->get_project(null);
        $this->load->view('template/html_head',$data);
        $this->load->view('template/html_script',$data);
        $this->load->view('work/index', $data);
        $this->load->view('template/html_tail',$data);
	}

    function project_view($project_id)
    {
        $data['page_id'] = "work";
        $data['project_details'] = $this->project->get_project($project_id);
        $data['project'] = $this->project->get_project(null);
        $this->load->view('template/html_head',$data);
        $this->load->view('template/html_script',$data);
        $this->load->view('work/project_view', $data);
        $this->load->view('template/html_tail',$data);
    }
}

